package com.littrabble.array;

import org.apache.log4j.Logger;

public class ArrayMain {

    public static Logger logger = Logger.getLogger(ArrayMain.class);
    
	public static void main(String[] args) {
		
		int[] data = new int[100];
		int n = 50;
		
		data[1] = 1;
		int digit = 1;
		
		for(int i=1;i<=n;i++) {
			
			for(int j=1;j<=digit;j++) {
				data[j] = data[j] * i;
			}
			
			for(int j=1;j<=digit;j++) {
				
				if(data[j] >= 10) {
					data[j+1] += data[j] / 10;
					data[j] = data[j] % 10;
					
					if(j == digit) {
						digit++;
					}
				}
			}
			
			// output
			System.out.print(i + "!= ");
			for(int k=digit;k>=1;k--) {
				System.out.print(data[k]);
			}
			System.out.println();
		}
		
	}
}
